#!/bin/sh
VIP=2408:8719:1200:119:188:210:0:1
LIP=119.188.210.149
RS=119.188.210.128
./dpip vlan add dpdk0.100 link dpdk0 id 100
./dpip addr add ${VIP}/126 dev dpdk0.100
./ipvsadm -A -t [${VIP}]:8083 -s rr
./ipvsadm -a -t [${VIP}]:8083 -r ${RS}:4501 -b
./ipvsadm --add-laddr -z ${LIP} -t [${VIP}]:8083 -F dpdk0.100
./dpip route add default via 119.188.210.254 dev dpdk0.100
./dpip route -6 add default via 2408:8719:1200:119:188:210:0:3 dev dpdk0.100

ARS=221.122.80.38
ALIP=119.188.210.149
./ipvsadm -A -t [${VIP}]:23451 -s rr
./ipvsadm -a -t [${VIP}]:23451 -r ${ARS}:23451 -b
./ipvsadm --add-laddr -z ${ALIP} -t [${VIP}]:23451 -F dpdk0.100
echo "ok"

ARS=2408:8719:1200:119:188:210:0:2
BLIP=2408:8719:1200:119:188:210:0:0
./ipvsadm -A -t [${VIP}]:8082 -s rr
./ipvsadm -a -t [${VIP}]:8082 -r [${ARS}]:4501 -b
./ipvsadm --add-laddr -z ${BLIP} -t [${VIP}]:8082 -F dpdk0.100

CVIP=119.188.210.243
CRS=221.122.80.38
CLIP=119.188.210.149
./dpip addr add ${CVIP}/24 dev dpdk0.100
./ipvsadm -A -t ${CVIP}:23452 -s rr
./ipvsadm -a -t ${CVIP}:23452 -r ${CRS}:23451 -b
./ipvsadm --add-laddr -z ${CLIP} -t ${CVIP}:23452 -F dpdk0.100



CVIP=119.188.210.243
CRS=119.188.210.128
CLIP=119.188.210.149
./ipvsadm -A -t ${CVIP}:8081 -s rr
./ipvsadm -a -t ${CVIP}:8081 -r ${CRS}:4501 -b
./ipvsadm --add-laddr -z ${CLIP} -t ${CVIP}:8081 -F dpdk0.100
